<script setup lang="ts">
const props = defineProps<{
  orderInfo?: any;
}>();
const record = props.orderInfo;
</script>

<template>
  <div>
    <a-space v-if="record.amount && record.offerId">
      <a-tag :color="record.amount > 0 ? 'red' : 'green'">
        {{ record.amount > 0 ? '盈' : '亏' }}
      </a-tag>
      <span
        :style="record.amount > 0 ? 'color: green' : 'color: red'"
        class="text-xl"
      >
        ¥ {{ record.amount }}
      </span>
    </a-space>
    <div
      v-if="record.dyOrderStatus === 2 && record.promiseRecommendEndShipTime"
    >
      <a-statistic-countdown
        :value="record.promiseRecommendEndShipTime * 1000"
        format="HH:mm:ss"
        style="margin-right: 50px"
        title="承诺时效"
      />
    </div>
  </div>
</template>
